<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>Homeless Shelter Occupancy</title>
  <%= stylesheet_link_tag 'style' %>
  <%= stylesheet_link_tag 'screen' %>
  <%= stylesheet_link_tag 'facebox' %>
  <%= javascript_include_tag 'jquery' %>
  <script>jQuery.noConflict();</script>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag 'facebox' %>
</head>
<body>

<div id="page">
	<div id="header">
	<% if logged_in? -%>
      	<span class="logged_in_user">Currently logged in as: <%= current_user.login %> | <%= link_to "Signout", session_path, :method => 'delete' %></span>
    <% else -%>
      <%= link_to "Login", new_session_path %>
    <% end -%>
		<h1><%= link_to "Homeless Housing Occupancy Project", home_path %></h1>
		<p class="description">A Cooperation between Georgia Tech and the United Way of Metropolitan Atlanta</p>

		<ul class="menu">
			<% if logged_in? -%>
				<li><%= link_to "Home", home_path %></li>
			
				<% if is_admin? -%>
					<li><%= link_to "Search", new_person_path %></li>
					<li><%= link_to "Edit users", users_path %></li>
					<li><%= link_to "Edit criteria", criterias_path %></li>
				<% else -%>
				  <% unless current_user.agency.nil? %>
  					<li><%= link_to "Sites", agency_sites_path(current_user.agency) %></li>
					<% end -%>
					<li><%= link_to "Search", new_person_path %></li>
				<% end -%>
			<% end -%>
		</ul>
	</div>

	<hr />

<div class="content">
	<div id="primary">

<p style="color: green"><%= flash[:notice] %></p>

<%= yield  %>

</div> <!-- #primary -->

<hr />

<div class="clear"></div>

</div> <!-- .content -->

</div> <!-- Close Page -->

<p id="footer">
<small>Theme: k2-lite by <a href="http://getk2.com">k2 team</a>.</small>
</p>

</body>
</html>
